package nix.mybatis.spring;

import nix.mybatis.pojo.User;
import nix.mybatis.spring.dao.UserDao;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyBatisSpringDaoTest {

	@Test
	public void fun1() {
		
		ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
		UserDao userDao = (UserDao) ac.getBean("userDao");
		
		User user = userDao.findById(10);
		System.out.println(user);
	}
}
